<template>
<el-pagination
  background
  layout="prev, pager, next"
  :total="pages*10" @current-change='page'>
</el-pagination>
</template>

<script>
import {createNamespacedHelpers} from "vuex";
const {mapState,mapMutations,mapActions}  = createNamespacedHelpers('articalData');
export default {
    data(){
        return{
        }
    },
    computed:{
        ...mapState(['pages']),
    },
    methods:{
        page(i){
            this.changeCurrenPage(i);
            this.getArticalAsync();
        },
        ...mapMutations(['changeCurrenPage']),
        ...mapActions(['getArticalAsync'])
    }
}
</script>

<style>

</style>